CREATE TABLE [dbo].[tb_DetalleComprobantes]
(
[IdDetalle] [int] NOT NULL IDENTITY(1, 1),
[IdComprobante] [int] NOT NULL,
[IdBien] [int] NOT NULL,
[Cantidad] [int] NOT NULL,
[Precio] [float] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_DetalleComprobantes] ADD CONSTRAINT [PK_tb_DetalleComprobante] PRIMARY KEY CLUSTERED  ([IdDetalle]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_DetalleComprobantes] ADD CONSTRAINT [FK_tb_DetalleComprobantes_Tb_Bienes] FOREIGN KEY ([IdBien]) REFERENCES [dbo].[Tb_Bienes] ([IDBien])
GO
ALTER TABLE [dbo].[tb_DetalleComprobantes] ADD CONSTRAINT [FK_tb_DetalleComprobantes_tb_Comprobantes] FOREIGN KEY ([IdComprobante]) REFERENCES [dbo].[tb_Comprobantes] ([IdComprobantes])
GO
